home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
programr
/
rsxwdk2s.zip
/
RSXWDK
/
LIBSRC
/
DOS
/
DOS4300.C
< prev
next >
Wrap
C/C++ Source or Header
|
1994-12-17
|
477b
|
29 lines
#include <errno.h>
#include <sys/doscalls.h>
/*
** AH = 0x43 ; AL = 0
** DS:DX name
** return CX: attr
*/
int dos_getfattr(const char *name, int * attr)
{
struct REGPACK r;
struct SEGPACK sr = { GetDS(), GetES()};
r.eax = 0x4300;
SET_SEG_OFF(name, sr.ds, r.edx);
_intxr(0x21, &r, &sr);
if (r.eflags & 1) {
_sys_doserror2errno( r.eax & 0xFFFF);
return (-1);
}
else {
*attr = r.ecx & 0xFFFF;
return 0;
}
}